Good morning all !
I come to ask for your support. I'm trying to make a selection on the data in my dataframe and since then I'm getting an error. I'm new to Python and I'm stuck on an error that's taking me a long time.
Below is my code:
if requete.method == 'POST':
myfile = requete.FILES['file']
fs = FileSystemStorage()
filename = fs.save(myfile.name, myfile)
uploaded_file_url = fs.url(filename)
df = pd.read_csv(os.path.join(MEDIA_ROOT, filename), sep=";", encoding='unicode_escape')
array = [
'Bundle_Weekly_400MB', 'Bundle_Daily_40MB',
'Bundle_Daily_150MB', 'Bundle_Daily_10MB', 'Bundle_Weekly_100MB',
]
df = df.loc[df['EXTERNAL_DATA1'] == 'dataBundle'] & df.loc[df['EXTERNAL_DATA2'].isin(array)]
Below is the error I got: